#pragma once
#include <QtWidgets/QMainWindow>
#include <QMouseEvent>
#include <QWidget>

class BaseWidget : public QWidget
{

	Q_OBJECT

public:
	explicit BaseWidget(QWidget *parent = 0);

	void setAreaMovable(const QRect rt);

private:
	QRect m_areaMovable;
	bool m_bPressed;
	QPoint m_ptPress;

protected:
	void mousePressEvent(QMouseEvent *);
	void mouseMoveEvent(QMouseEvent *);
	void mouseReleaseEvent(QMouseEvent *);
};